function HUDdraw()
if !LocalPlayer():Alive() then return end
if(LocalPlayer():GetActiveWeapon() == NULL or LocalPlayer():GetActiveWeapon() == "Camera") then return end
--------------------------------
clip={}
clip["weapon_ak47"]=25
clip["weapon_crowbar"]=1
clip["weapon_deagle"]=8
clip["weapon_fiveseven"]=21
clip["weapon_glock"]=16
clip["weapon_m4"]=25
clip["weapon_mp5"]=32
clip["weapon_para"]=100
clip["weapon_pumpshotgun"]=8
clip["weapon_tmp"]=25
clip["weapon_mac10"]=25
--------------------------------

    local BaseH = 125
    local BaseW = 250
    local BaseX = ScrH() - BaseH
    local BaseY = BaseW
    local Brightness = 10
    p = LocalPlayer()
    draw.RoundedBox( 12, 0, ScrH() - BaseH, BaseW, BaseH, Color( Brightness, Brightness, Brightness, 200 ) )
    --Health
    draw.RoundedBox( 6, 5, ScrH() - 120, 240, 20, Color(0, 75, 0, 255) )
    if p:Health() > 4 then
        draw.RoundedBox( 6, 5, ScrH() - 120, p:Health()/0.416, 20, Color(0, 255, 0, 255) )
    end
    --Armor
    draw.RoundedBox( 6, 5, ScrH() - 95, 240, 20, Color(0, 0, 75, 255) )
    if p:Armor() > 4 then
        draw.RoundedBox( 6, 5, ScrH() - 95, p:Armor()/0.416, 20, Color(0, 0, 255, 255) )
    end

    --Ammo
    local ammo = p:GetActiveWeapon():Clip1()
    local maxammo = p:GetAmmoCount(p:GetActiveWeapon():GetPrimaryAmmoType())

    draw.RoundedBox( 6, 5, ScrH() - 70, 190, 20, Color(75, 71, 0, 1200) )
    draw.DrawText(ammo .. "/" .. maxammo, "ScoreboardText", 200, ScrH() - 70, Color(255,255,255,255), TEXT_ALIGN_LEFT)
    if ammo > (clip[p:GetActiveWeapon():GetClass()]   *0.03) then
        draw.RoundedBox( 6, 5, ScrH() - 70, ammo/(clip[p:GetActiveWeapon():GetClass()]/190), 20, Color(255, 242, 0, 200) )
    end
    --Money and stuff
    local cash = LocalPlayer():GetNWInt("money", 0)
    draw.DrawText("Money: " .. cash, "ScoreboardText", 5, ScrH() - 45, Color(255,255,255,255), TEXT_ALIGN_LEFT) 

    if LocalPlayer():GetEyeTrace().Entity:IsNPC() then
        local lookent = LocalPlayer():GetEyeTrace().Entity
        if lookent:GetPos():Distance( LocalPlayer():GetPos() ) < 1000 then
            local pos = lookent:GetPos()
            local distance = lookent:GetPos():Distance( LocalPlayer():GetPos() )
            local class = lookent:GetClass()
            z={}
            z["npc_zombie"]=70
            z["npc_fastzombie"]=70
            z["npc_antlion"]=70
            z["npc_headcrab_fast"]=40
            z["npc_manhack"]=10
            z["npc_rollermine"]=20
            z["npc_antlionguard"]=120
            z["npc_headcrab"]=40
            
            name={}
            name["npc_zombie"]="Zombie"
            name["npc_fastzombie"]="Fast Zombie"
            name["npc_antlion"]="Antlion"
            name["npc_headcrab_fast"]="Headcrab"
            name["npc_manhack"]="Manhack"
            name["npc_rollermine"]="Rollermine"
            name["npc_antlionguard"]="Antlion Guardian"
            name["npc_headcrab"]="Headcrab"
            pos.z = pos.z + z[class]
            pos = pos:ToScreen()
            draw.DrawText(name[class], "ScoreboardText", pos.x, pos.y, Color(200, 200, 200, 255), TEXT_ALIGN_CENTER)
        end    
    end
end
local function Hide(name)
    for k, v in pairs({"CHudHealth", "CHudBattery", "CHudAmmof", "CHudSecondaryAmmo"}) do
        if v == name then return false end
    end 
end

function Spawnmenu()
    
end

hook.Add("HUDShouldDraw", "HideHUDElements", Hide)
hook.Add("HUDPaint", "HUD", HUDdraw)
hook.Add("SpawnMenuEnabled", "NoSpawnMenu", Spawnmenu) 












